home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tool-inc.zip / DELSPACE.INC < prev    next >
Text File  |  1989-06-02  |  879b  |  36 lines

  1.  
  2. (*
  3.  * Copyright 1987, 1989 Samuel H. Smith;  All rights reserved
  4.  *
  5.  * This is a component of the ProDoor System.
  6.  * Do not distribute modified versions without my permission.
  7.  * Do not remove or alter this notice or any other copyright notice.
  8.  * If you use this in your own program you must distribute source code.
  9.  * Do not use any of this in a commercial product.
  10.  *
  11.  *)
  12.  
  13. procedure delete_spaces(var line: string);
  14. var
  15.    p: integer;
  16. begin
  17.    p := pos(' ',line);
  18.    while p > 0 do
  19.    begin
  20.       delete(line,p,1);
  21.       p := pos(' ',line);
  22.    end;
  23. end;
  24.  
  25. procedure delete_trailing_spaces(var line: string);
  26. begin
  27.    while (length(line) > 0) and (line[length(line)] <= ' ') do
  28.       dec(line[0]);
  29. end;
  30.  
  31. procedure delete_leading_spaces(var line: string);
  32. begin
  33.    while (length(line) > 0) and (line[1] <= ' ') do
  34.       delete(line,1,1);
  35. end;
  36.